//interface 追加合并 与继承
interface Personxx {
  name: string;
  age: number;
}
interface Personxx {
  speakB(n: number): number;
  speakc: (n: number) => void;
}
interface Stut extends Personxx {
  grand: string;
}
//type交叉合并与继承交叉
type PersonType = {
  name: string;
  age: number;
} & { speakB(n: number): number; speakc: (n: number) => void };

type StutType = PersonType & { grand: string };

let stut: StutType = {
  name: "张三",
  age: 18,
  speakB(n: number) {
    return n;
  },
  speakc: (n: number) => {},
  grand: "张三",
};
